angular.module('personal-info', [])

.controller 'PersonalInfoCtrl', ($scope, $state, $http, $ionicHistory,$ionicPopup, $ionicViewSwitcher,$stateParams,userData) ->
    $scope.username = userData.get().username
    $scope.goBack = ->
        $ionicViewSwitcher.nextDirection('back')
        $ionicHistory.goBack()

    $scope.goUpdatePwd = ->
        $state.go 'tab.update-pwd'

    $scope.goSex = ->
        $state.go 'tab.personal-info-sex'

    $scope.goName = ->
        $state.go 'tab.personal-info-name'

    $scope.goRegion = ->
        $state.go 'tab.pick-region'

